import org.junit.jupiter.api.*;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class JunitTest {
    @Test
    void Test01() {
        System.out.println("这是JunitTest里面的Test01");
    }

    @Test
    void Test02() {
        System.out.println("这是JunitTest里面的Test02");
    }

    @Disabled
    void Test03() {
        WebDriver webDriver = new ChromeDriver();
        webDriver.get("https://www.baidu.com");
        webDriver.findElement(By.cssSelector("#s-top-left > a:nth-child(6)"));
    }

//    @BeforeAll
//    static void SetUp() {
//        System.out.println("这是我们BeforeAll里面的语句");
//    }
//
//    @AfterAll
//    static void TearDown() {
//        System.out.println("这是我们AfterAll里面的语句");
//    }

    @BeforeEach
    void BeforeEachTest() {
        System.out.println("这是我们BeforeEachTest里面的语句");
    }

    @AfterEach
    void AfterEachTest() {
        System.out.println("这是我们AfterEachTest里面的语句");
    }

    @PararmeterizedTest
    @ValueSource(ints = {1,2,3})
    void Test04(int num) {
        System.out.println(num);
    }

    @PararmeterizedTest
    @ValueSource(strings = {"1","2","3"})
    void Test04(String number){
        System.out.println(number);
    }

    @PararmeterizedTest
    @CsvFileSource(resources = "test01.csv")
    void Test06() {
        System.out.println("");
    }

}
